/*
  Darts -- Double-ARray Trie System

  $Id: darts.h.in 1674 2008-03-22 11:21:34Z taku $;

  Copyright(C) 2001-2007 Taku Kudo <taku@chasen.org>
*/
#ifndef DARTS_H_
#define DARTS_H_

#include "dictionary_tool.h"

#define THAI_DICT_SIZE 25000
#define ENG_DICT_SIZE 25000
#define ACRONYMS_DICT_SIZE 1000
#define PRONUN_DICT_SIZE 1000


typedef struct _pronun_word{
	char **word;
	char **phone;
	int size;
}pronun_word;

typedef struct _phone_src_struct{
	int number;
	int prefix;
}phone_src_struct;

typedef struct _pronun_phone{
	int *phone;
	int n_syl;
}pronun_phone;
typedef struct _pronun_phone_set{
	pronun_phone **phone;
	int size;
	int max_size;
}pronun_phone_set;

extern int Dict_Thai_Load(char * file_tree,char *file_phonename);
extern int Dict_Eng_Load(char * file_tree, char *file_phoneme);
extern int Dict_Pronun_Load(char * file_tree, char *file_phoneme);
extern int Dict_Acronyms_Load(char * file_tree, char *file_phoneme);
extern int Dict_Esan_Load(char * file_tree, char *file_phoneme);
extern int Wordbound_Load(char * file_tree, char *file_phoneme);
int Dict_Genaral_Load(char * file_tree,char * file_phone,Darts::DoubleArray * dict_tree,pronun_phone_set * dict_phone,int dsize);
pronun_phone * Dict_Esan_Search(char * word);
extern char * Dict_Thai_Search(char * word);
extern char * Dict_Eng_Search(char * word);
extern char * Dict_Pronun_Search(char * word);
extern char * Dict_Acronyms_Search(char * word);
extern char * Wordbound_Search(char * word);
extern int Dict_Load_Index(char * file_tree,Darts::DoubleArray * dict_tree);
#endif /* DICTIONARYTOOL_H_ */
